package com.goldenlight.fvms.manager.converter;

import com.goldenlight.fvms.manager.entity.FreeApply;
import com.goldenlight.fvms.manager.vo.CompareVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface CompareConverter {
    @Mappings({
            @Mapping(source = "applyId", target = "applyIdOld"),
            @Mapping(source = "typeCode", target = "typeCodeOld"),
            @Mapping(source = "applyUnit", target = "applyUnitOld"),
            @Mapping(source = "carNum", target = "carNumOld"),
            @Mapping(source = "carLabel", target = "carLabelOld"),

            @Mapping(source = "carColor", target = "carColorOld"),
            @Mapping(source = "carModel", target = "carModelOld"),
            @Mapping(source = "companyId", target = "companyIdOld"),
            @Mapping(source = "timeStamp", target = "timeStampOld"),
            @Mapping(source = "buildVersion", target = "buildVersionOld"),
            @Mapping(source = "carBussType", target = "carBussTypeOld")
    })
    CompareVO convertOld(FreeApply oldFreeApply);

}
